package com.bwei.like.mynewstop.adapater;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.bwei.like.mynewstop.R;
import com.bwei.like.mynewstop.base.MyBaseAdapater;
import com.bwei.like.mynewstop.utils.CommonUtils;
import com.bwei.like.mynewstop.utils.TitileUtils;

import java.util.ArrayList;

/**
 * Created by LiKe on 2016/11/10.
 */
public class MoreChnanelAdapater extends MyBaseAdapater<String> {
    public MoreChnanelAdapater(ArrayList<String> arrayList, Context context) {
        super(arrayList, context);
    }

    @Override
    public View initView(int position, View convertView, ViewGroup parent) {
        TextView textView = new TextView(context);
        textView.setText(TitileUtils.moreChannel.get(position).substring(0,TitileUtils.moreChannel.get(position).indexOf(":")));
<<<<<<< 77331352d74e6afdfbbeaccca4370d33ffbea935
        textView.setBackgroundResource(R.mipmap.title);
=======
        textView.setTextSize(25);
>>>>>>> NewsTop
        textView.setPadding(CommonUtils.dip2px(5),CommonUtils.dip2px(5),CommonUtils.dip2px(5),CommonUtils.dip2px(5));
        return textView;
    }
}
